<template>
  <div class="son">
    儿子：(家庭总资产为：{{ count }})
    <button @click="$emit('makeMoney')">赚钱</button>
    <button @click="$emit('spendMoney')">花钱</button>
  </div>
</template>

<script setup lang="ts">
import { ref } from "vue";
import { defineProps } from 'vue';

const props = defineProps({
  count: {
    type: Number,
    required: true
  }
});

</script>

<style scoped>
.son {
  margin-top: 20px;
  margin-left: 20px;
  background-color: #1cdb39;
  color: #ffffff;
  width: 800px;
  height: 200px;
}
</style>